package com.woniu.product.service;

import com.woniu.product.client.param.AddSkuParam;
import com.woniu.product.infra.model.Sku;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.product.service.dto.PageCrowdProductDto;
import com.woniu.product.service.dto.ProductItemDto;
import com.woniu.product.service.dto.SkuCanUseCouponDto;
import com.woniu.product.service.form.ListCrowdProductForm;
import com.woniu.result.Result;
import com.woniu.product.service.form.DeductStockServiceParam;
import com.woniu.product.service.form.RestoreStockServiceParam;

import java.util.List;

/**
 * <p>
 * 库存量单位 服务类
 * </p>
 *
 * @author Lucas
 * @since 2022-11-26
 */
public interface SkuService extends IService<Sku> {

    void deductStock(DeductStockServiceParam deductStockServiceParam) throws InterruptedException;

    void restoreStock(RestoreStockServiceParam restoreStockServiceParam) throws InterruptedException;

    ProductItemDto queryProductItem(Integer skuId);
    void addSku(AddSkuParam addSkuParam);

    Result upsku(Integer skuId);

    Result downsku(Integer skuId);

    Result delsku(Integer skuId);

    void addSkuSalesCount(Integer skuId,Integer count);

    void subtractSkuSalesCount(Integer skuId,Integer count);

}
